﻿using Logic;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace web_CategoryMS.View.G01
{
    public partial class FS0101_Sub : System.Web.UI.Page
    {
        FS0102_SubLogic logic = new FS0102_SubLogic();
        protected void Page_Load(object sender, EventArgs e)
        {

        }

        #region 保存事件
        protected void btnSave_Click(object sender, EventArgs e)
        {
            try
            {
                string strRes = logic.Save(txtProjectNo.Text.Trim());
                if (strRes == "")
                {
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "", "window.opener.recall();window.close();", true);
                }
                else
                {
                    ScriptManager.RegisterStartupScript(this, typeof(Page), "", "alert('" + strRes + "');", true);
                }
                
            }
            catch (Exception ex)
            {
                ScriptManager.RegisterStartupScript(this, typeof(Page), "", "alert('程序出现异常，异常信息：" + ex.Message + "')", true);
            }
        }
        #endregion
    }
}